package com.dk.controller;

import com.alibaba.dubbo.config.annotation.Reference;
import com.dk.service.TestService;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

@Controller
@RequestMapping("testController")
public class TestController {
    //dubbo接口远程调用
    @Reference //注意一定不要写错, 不然空指针
    private TestService testService;
    @RequestMapping("test")
    @ResponseBody
    public String test(){
        String result = testService.test("aaa");
        return result;
    }
}
